package com.mika.music.model;

import lombok.Data;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

@Data
public class MusicLabel {
    // 标签类，用来存放音乐对应的标签
    private Integer id;
    private Integer musicId;
    private String labelName;
    private Integer deleteFlag;
    private Date createTime;
    private Date updateTime;

    public String getCreateTime() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        // 使日期按照地区显示，这样才能够得到准确的时间
        TimeZone zone = TimeZone.getTimeZone("MST");
        simpleDateFormat.setTimeZone(zone);
        return simpleDateFormat.format(createTime);
    }


}
